package com.bestv.search.common.dataSource;

import org.hibernate.Hibernate;
import org.hibernate.dialect.function.SQLFunctionTemplate;

import java.sql.Types;

public class MySQL5Dialect extends org.hibernate.dialect.MySQL5Dialect {
    public MySQL5Dialect() {
        super();
        registerFunction("regexp", new SQLFunctionTemplate(Hibernate.BOOLEAN, " ?1 REGEXP ?2 "));
        registerHibernateType(Types.LONGVARCHAR, Hibernate.TEXT.getName());
        registerHibernateType(Types.LONGVARBINARY, Hibernate.BLOB.getName());
    }
}